home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / vesatp11 / doc / vgraph.int < prev   
Encoding:
Text File  |  1994-05-20  |  9.6 KB  |  303 lines

  1. INTERFACE
  2.  
  3.     CONST
  4.         VERSION1            = 'VESA Library - Version 1.10/286';
  5.         VERSION2            = '(c) 1994 by Mark Stehr   mkstehr@cip.informatik.uni-erlangen.de';
  6.  
  7.         V800x600x16    = $102;
  8.         V1024x768x16   = $104;
  9.       V1280x1024x16  = $106;
  10.         V320x200x256    = $13;
  11.         V640x400x256   = $100;
  12.         V640x480x256   = $101;
  13.         V800x600x256   = $103;
  14.         V1024x768x256  = $105;
  15.         V1280x1024x256 = $107;
  16.         V320x200x32k   = $10d;
  17.         V640x480x32k   = $110;
  18.         V800x600x32k   = $113;
  19.         V1024x768x32k  = $116;
  20.       V1280x1024x32k = $119;
  21.         V320x200x64k   = $10e;
  22.         V640x480x64k   = $111;
  23.         V800x600x64k   = $114;
  24.         V1024x768x64k  = $117;
  25.       V1280x1024x64k = $11a;
  26.         V320x200x16M   = $10f;
  27.         V640x480x16M   = $112;
  28.         V800x600x16M   = $115;
  29.         V1024x768x16M  = $118;
  30.         V1280x1024x16M = $11b;
  31.  
  32.         PEL            = FALSE;                    { SetPaletteFlag }
  33.         BIOS            = TRUE;                    { SetPaletteFlag }
  34.  
  35.         grOk                      = 0;
  36.         grNoVesa               = -1;
  37.         grText                 = -2;
  38.         grMode16               = -3;
  39.         grHardware             = -4;
  40.         grPCX                      = -5;
  41.         grFontNotFound     = -6;
  42.         grNoFontMem         = -7;
  43.         grInvalidFontNum     = -8;
  44.         grFileNotFound    = -9;
  45.         grMode16m            = -10;
  46.  
  47.       { define graphics drivers }
  48.           CurrentDriver = -128; { passed to GetModeRange }
  49.           Detect        = 9;    { requests autodetection }
  50.           CGA           = 1;
  51.           MCGA          = 2;
  52.           EGA           = 3;
  53.           EGA64         = 4;
  54.           EGAMono       = 5;
  55.           IBM8514       = 6;
  56.           HercMono      = 7;
  57.           ATT400        = 8;
  58.           VGA           = 9;
  59.           PC3270        = 10;
  60.  
  61.         { Line styles and widths for Get/SetLineStyle: }
  62.         SolidLn    = 0;
  63.         DottedLn   = 1;
  64.         CenterLn   = 2;
  65.         DashedLn   = 3;
  66.         UserBitLn  = 4;       { User-defined line style }
  67.  
  68.         NormWidth  = 1;
  69.         ThickWidth = 3;
  70.  
  71.         { Set/GetTextStyle constants: }
  72.         DefaultFont   = 0;    { 8x8 bit mapped font }
  73.         TriplexFont   = 1;    { "Stroked" fonts }
  74.         SmallFont     = 2;
  75.         SansSerifFont = 3;
  76.         GothicFont    = 4;
  77.  
  78.         HorizDir   = 0;       { left to right }
  79.         VertDir    = 1;       { bottom to top }
  80.  
  81.         UserCharSize = 0;     { user-defined char size }
  82.  
  83.         { Clipping constants: }
  84.         ClipOn  = true;
  85.         ClipOff = false;
  86.  
  87.         { Bar3D constants: }
  88.         TopOn  = true;
  89.         TopOff = false;
  90.  
  91.         { Fill patterns for Get/SetFillStyle: }
  92.         EmptyFill       = 0;  { fills area in background color }
  93.         SolidFill       = 1;  { fills area in solid fill color }
  94.         LineFill        = 2;  { --- fill }
  95.         LtSlashFill     = 3;  { /// fill }
  96.         SlashFill       = 4;  { /// fill with thick lines }
  97.         BkSlashFill     = 5;  { \\\ fill with thick lines }
  98.         LtBkSlashFill   = 6;  { \\\ fill }
  99.         HatchFill       = 7;  { light hatch fill }
  100.         XHatchFill      = 8;  { heavy cross hatch fill }
  101.         InterleaveFill  = 9;  { interleaving line fill }
  102.         WideDotFill     = 10; { Widely spaced dot fill }
  103.         CloseDotFill    = 11; { Closely spaced dot fill }
  104.         UserFill        = 12; { user defined fill }
  105.  
  106.         { BitBlt operators for PutImage: }
  107.         NormalPut     = 0;    { MOV }       { left for 1.0 compatibility }
  108.         CopyPut       = 0;    { MOV }
  109.         XORPut        = 1;    { XOR }
  110.         OrPut         = 2;    { OR  }
  111.         AndPut        = 3;    { AND }
  112.         NotPut        = 4;    { NOT }
  113.  
  114.         { Horizontal and vertical justification for SetTextJustify: }
  115.         LeftText   = 0;
  116.         CenterText = 1;
  117.         RightText  = 2;
  118.  
  119.         BottomText = 0;
  120.         { CenterText = 1; already defined above }
  121.         TopText    = 2;
  122.  
  123.     TYPE
  124.         LineSettingsType = record
  125.              LineStyle : word;
  126.              Pattern   : word;
  127.              Thickness : word;
  128.         END;
  129.  
  130.         TextSettingsType = record
  131.              Font      : word;
  132.              Direction : word;
  133.              CharSize  : word;
  134.              Horiz     : word;
  135.              Vert      : word;
  136.         END;
  137.  
  138.         FillSettingsType = record               { Pre-defined fill style }
  139.              Pattern : word;
  140.              Color   : LONGINT;
  141.         END;
  142.  
  143.         FillPatternType = array[1..8] of byte;  { User defined fill style }
  144.  
  145.         PointType = record
  146.              X, Y : integer;
  147.         END;
  148.  
  149.         ViewPortType = record
  150.              x1, y1, x2, y2 : integer;
  151.              Clip           : boolean;
  152.         END;
  153.  
  154.         ArcCoordsType = record
  155.              X, Y           : integer;
  156.              Xstart, Ystart : integer;
  157.              Xend, Yend     : integer;
  158.         END;
  159.  
  160.         ColorType = record
  161.             r,g,b : byte;
  162.         end;
  163.         PaletteType = array [0..$FF] of ColorType;
  164.  
  165.     { *** high-level error handling *** }
  166.     FUNCTION GraphResult : INTEGER;
  167.     FUNCTION GraphErrorMsg(ErrorCode : INTEGER):STRING;
  168.  
  169.     { *** detection, initialization and crt mode routines *** }
  170.    FUNCTION RegisterBGIFont(Font : POINTER):INTEGER;
  171.    PROCEDURE InstallUserFnt(Font : POINTER);
  172.     FUNCTION GetDriverName:STRING;
  173.     PROCEDURE InitVesa(modus : WORD);
  174.     FUNCTION GetModeName(ModeNumber : WORD):STRING;
  175.     PROCEDURE SetGraphMode(modus : WORD);
  176.     FUNCTION GetGraphMode: WORD;
  177.     PROCEDURE GraphDefaults;
  178.     PROCEDURE RestoreCrtMode;
  179.    PROCEDURE CloseVesa;
  180.     FUNCTION GetX:INTEGER;
  181.     FUNCTION GetY:INTEGER;
  182.     FUNCTION GetMaxX:Integer;
  183.     FUNCTION GetMaxY:Integer;
  184.     FUNCTION FindVesaMode(xsize,ysize : word; bitpixel : byte):WORD;
  185.    FUNCTION GetMaxRed:BYTE;
  186.    FUNCTION GetMaxGreen:BYTE;
  187.    FUNCTION GetMaxBlue:BYTE;
  188.     FUNCTION GetMaxPage:BYTE;
  189.     FUNCTION GetVMaxX:INTEGER;
  190.     FUNCTION GetVMaxY:INTEGER;
  191.     PROCEDURE SetRestoreFlag(YesNo : BOOLEAN);
  192.     PROCEDURE SetPaletteFlag(method : BOOLEAN);
  193.     PROCEDURE SetClearFlag(YesNo : BOOLEAN);
  194.  
  195.     { *** Screen, viewport, page routines *** }
  196.     PROCEDURE cleardevice;
  197.     PROCEDURE SetViewPort(x1,y1,x2,y2 : Integer; Clip : BOOLEAN);
  198.    PROCEDURE GetViewSettings(Var ViewPort : ViewPortType);
  199.     PROCEDURE ClearViewPort;
  200.    PROCEDURE SetVisualPage(page : BYTE);
  201.     PROCEDURE SetActivePage(page : BYTE);
  202.  
  203.     { *** point-oriented routines *** }
  204.    PROCEDURE putpixel(x,y : Integer; color : LONGINT);
  205.     PROCEDURE putpixel2(x,y : Integer);
  206.     FUNCTION getpixel(x,y : Integer):LONGINT;
  207.  
  208.     { *** line-oriented routines *** }
  209.    PROCEDURE SetWriteMode(modus : BYTE);
  210.     PROCEDURE lineh(x1,y1,x2,y2 : Integer);
  211.     PROCEDURE linev(x1,y1,x2,y2 : Integer);
  212.     PROCEDURE line(x1,y1,x2,y2 : Integer);
  213.     PROCEDURE LineTo(x,y:INTEGER);
  214.     PROCEDURE LineRel(dx,dy:INTEGER);
  215.     PROCEDURE MoveTo(x,y:INTEGER);
  216.     PROCEDURE MoveRel(dx,dy:INTEGER);
  217.     PROCEDURE SetLineStyle(LineStyle,Pattern,Thickness : WORD);
  218.     PROCEDURE GetLineSettings(VAR LineInfo : LineSettingsType);
  219.  
  220.     { *** polygon, fills and figures *** }
  221.     PROCEDURE bar(x1,y1,x2,y2 : Integer);
  222.     PROCEDURE bar3d(x1,y1,x2,y2,depth : Integer; top : BOOLEAN);
  223.     PROCEDURE rectangle(x1,y1,x2,y2 : Integer);
  224.     PROCEDURE RoundedRectangle(X1,Y1,X2,Y2 : INTEGER; r : Word);
  225.     PROCEDURE DrawPoly(NumPoints : Integer; VAR PolyPoints);
  226.     PROCEDURE FillPoly(NumPoints : WORD; VAR PolyPoints);
  227.     PROCEDURE DrawBezier(NumPoints : WORD; VAR PolyPoints);
  228.    PROCEDURE FloodFill(x,y : Integer; border : LONGINT);
  229.     PROCEDURE SetFillPattern(FillPattern : FillPatternType; color : LONGINT);
  230.     PROCEDURE GetFillSettings(VAR FillInfo : FillSettingsType);
  231.     PROCEDURE GetFillPattern(VAR FillPattern : FillPatternType);
  232.     PROCEDURE SetFillStyle(Pattern : WORD; color : LONGINT);
  233.     
  234.     { *** arc, circle, and other curves *** }
  235.     PROCEDURE circle(x,y,radius: Integer);
  236.     PROCEDURE arc(x,y,startangle,endangle,radius : Integer);
  237.     PROCEDURE PieSlice(x,y,startangle,endangle,radius : Integer);
  238.     PROCEDURE ellipse(x,y,startangle,endangle,xradius,yradius : Integer);
  239.     PROCEDURE FillEllipse(x0,y0: INTEGER;b,a : LONGInt);
  240.     PROCEDURE sector(x,y,startangle,endangle,xradius,yradius : Integer);
  241.     PROCEDURE GetArcCoords(VAR ArcCoords : ArcCoordsType);
  242.     PROCEDURE GetAspectRatio(VAR XAsp,YAsp : WORD);
  243.     PROCEDURE SetAspectRatio(XAsp,YAsp : WORD);
  244.  
  245.     { *** color and palette routines *** }
  246.     FUNCTION GetColor:LONGINT;
  247.     PROCEDURE SetColor(col : LONGINT);
  248.     FUNCTION GetMaxColor:LONGINT;
  249.     PROCEDURE SetPal(VAR pal);                                { Palette neu setzen }
  250.     PROCEDURE GetPal(VAR pal : PaletteType);            { Palette auslesen }
  251.     PROCEDURE PushPal(VAR pal : PaletteType);       { Palette verschieben }
  252.     PROCEDURE NewPal(VAR pal : PaletteType);
  253.     PROCEDURE SetRGBPal(color,r,g,b: BYTE);
  254.     PROCEDURE GetRGBPal(color : BYTE; VAR r,g,b: BYTE);
  255.     PROCEDURE GetPalette(VAR pal : PaletteType);            { graph.tpu }
  256.     PROCEDURE SetPalette(ColorNum : WORD; color : SHORTINT); { graph.tpu }
  257.     PROCEDURE SetAllPalette(VAR palette);                    { graph.tpu }
  258.  
  259.     PROCEDURE FadeUp(d:BYTE; pal : PaletteType);
  260.     PROCEDURE FadeDown(d:BYTE; pal : PaletteType);
  261.  
  262.     PROCEDURE border(color : BYTE);
  263.     PROCEDURE grayscale;
  264.     PROCEDURE turnon;
  265.     PROCEDURE turnoff;
  266.  
  267.     { *** bit-image routines *** }
  268.    FUNCTION imagesize(x1,y1,x2,y2 : Integer):LONGINT;
  269.     PROCEDURE putimage(x1,y1,x2,y2 : Integer; VAR SaveAddr);
  270.    PROCEDURE putsprite(x1,y1,x2,y2 : Integer; VAR SaveAddr);
  271.     PROCEDURE getimage(x1,y1,x2,y2 : Integer;VAR SaveAddr);
  272.     PROCEDURE fillimage(x,y,x2,y2 : Integer);
  273.     PROCEDURE LoadPCX(x1,y1 : Integer; PCXFName : STRING);
  274.     PROCEDURE SavePCX(x1,y1,x2,y2 : Integer; PCXFName : STRING);
  275.  
  276.     { *** text routines *** }
  277.     PROCEDURE outtext(text : STRING);
  278.     PROCEDURE outtextxy(x,y : Integer; text : STRING);
  279.     FUNCTION TextWidth(Text : STRING):WORD;
  280.     FUNCTION TextHeight(Text : STRING):WORD;
  281.     PROCEDURE SetUserCharSize(MultX,DivX,MultY,DivY : WORD);
  282.     PROCEDURE SetTextStyle(Font,Direction,CharSize : WORD);
  283.     PROCEDURE SetTextJustify(Horiz,Vert : WORD);
  284.     PROCEDURE GetTextSettings(VAR TextInfo : TextSettingsType);
  285.  
  286.     { *** scrolling routines *** }
  287.     PROCEDURE ResetScroll;
  288.     PROCEDURE ScrollUp;
  289.     PROCEDURE ScrollDown;
  290.     PROCEDURE ScrollRight;
  291.     PROCEDURE ScrollLeft;
  292.     PROCEDURE Scroll(i,j : INTEGER);
  293.     PROCEDURE Split(zeile : WORD);
  294.    PROCEDURE SetVirtualWidth(Width : WORD);
  295.  
  296.     { *** other routines *** }
  297.     PROCEDURE swapRGB;
  298.     FUNCTION rgb(r,g,b : WORD):LONGINT;
  299.     FUNCTION st(zahl : LONGINT):STRING;
  300.     FUNCTION min(a,b : LONGINT):LONGINT;
  301.     PROCEDURE swapI(VAR a,b : INTEGER);
  302.     PROCEDURE swapB(VAR a,b : BYTE);
  303.     PROCEDURE Beep;